// JavaScript Document
function remove_wishlist(id_product)
{
		var allcookies = document.cookie;
	//	alert(allcookies);
     cookiearray  = allcookies.split(';');
   // Now take key value pair out of this array
   for(var i=0; i<cookiearray.length; i++){
	   name = cookiearray[i].split('=')[0];
       value = cookiearray[i].split('=')[1];
	   if(name.replace(' ','')=='product')
	   {	 var value_update;
		   value_array=value.split(',');
		   for(var i=0;i<value_array.length; i++)
		   {
			   if(value_array[i]==id_product) continue;
			   value_update=value_update+','+value_array[i];
			   
		   }//end for
		    document.cookie="product=" + value_update;

	   }// end if
		
	}// end for
	var class_tr="table tr[class='"+id_product+"']";
	//alert(class_tr);
	$(class_tr).hide();
}
function remove_compare(id_product)
{
		var allcookies = document.cookie;
     cookiearray  = allcookies.split(';');
   for(var i=0; i<cookiearray.length; i++){
	   name = cookiearray[i].split('=')[0];
       value = cookiearray[i].split('=')[1];
	   if(name.replace(' ','')=='productcompare')
	   {	 var value_update;
		   value_array=value.split(',');
		   for(var i=0;i<value_array.length; i++)
		   {
			   if(value_array[i]==id_product) continue;
			   value_update=value_update+','+value_array[i];
			   
		   }//end for
		    document.cookie="productcompare=" + value_update;
			window.location.assign("http://localhost:8080/theoffice/?page_id=169")

	   }// end if
		
	}// end for
	//var class_tr="table tr[class='"+id_product+"']";
	//alert(class_tr);
	//$(class_tr).hide();
}